#ifndef _MINHEAP_H_
#define _MINHEAP_H_

struct minheap;
struct minheapOps;

struct minheapOps{
    int(*init)(struct minheap *this);
    int(*insert)(struct minheap *this, int key);
    int(*remove)(struct minheap *this, int key);
    int(*des)(struct minheap *this);
};

struct minHeapNode{
    int index ;
    int key   ;
};

struct minheap{
    struct minHeapNode  * nodeList;
    int headIndex;
    int lastIndex;
    int maxNum;

    struct minheapOps   * ops;
};

int minHeapInit(struct minheap *this);
int minHeapDes(struct minheap *this);

#endif